import {createApp} from 'vue'
import App from './App.vue'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';//数据持久化
import {createPinia} from 'pinia'//pinia 转态管理注册
import * as ElementPlusIconsVue from '@element-plus/icons-vue'//注册图标
import element from 'element-plus'//element puls 注册
import router from './router/router'//路由注册
const pinia = createPinia()
const app = createApp(App)
import zhCn from "element-plus/es/locale/lang/zh-cn";

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(element, {
    locale: zhCn
})
app.use(router)
app.mount('#app')